package com.android.progressdemo;

import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
// 哈哈哈6666
public class MainActivity extends AppCompatActivity {

    private ProgressView progressView1;
    private TextBarView textBarView1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        progressView1 = findViewById(R.id.progressView1);
        textBarView1 = findViewById(R.id.textBarView1);
    }

    public void animation1(View view) {
        float progress = (float) (Math.random() * 100);
        progressView1.setProgressWithAnim(progress);
        textBarView1.setProgressWithAnim(progress);

    }

    public void animation2(View view) {
        float progress = (float) (Math.random() * 100);
        progressView1.setProgress(progress);
        textBarView1.setProgress(progress);
    }
}